<template>
  <div class="box">
    <!-- 单图 -->
    <div class="Singlepicture" v-if="article.type==1&&article.cover.length<3">
      <div class="Single">
        <div class="title">{{article.title}}</div>
        <div class="info">{{article.user.nickname}} &nbsp;&nbsp; {{article.comment_length}}跟帖</div>
      </div>
      <img :src="article.cover[0].url" class="images" />
    </div>
    <!-- 多图 -->
    <div class="multiplie" v-if="article.type==1&&article.cover.length>=3">
      <div class="title">{{article.title}}</div>
      <img :src="article.cover[0].url" class="mulimg" />
      <img :src="article.cover[1].url" class="mulimg" />
      <img :src="article.cover[2].url" class="mulimg" />
      <div class="info">
        {{article.user.nickname}}
        {{article.comment_length}}跟帖
      </div>
    </div>
    <!-- 视频 -->
    <div class="video" v-if="article.type==2 &&article.cover.length>=1">
      <div class="title">{{article.title}}</div>
      <div class="cover">
        <img :src="article.cover[0].url" />
        <div class="iconfont iconshipin"></div>
      </div>
      <div class="info">
        {{article.user.nickname}}
        {{article.comment_length}}跟帖
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: ["article"]
};
</script>

<style lang="less" scoped>
.box {
  .Singlepicture {
    margin-top: 2.778vw;
    padding: 2.778vw;
    display: flex;
    // padding: 2.778vw 0;
    border-bottom: 0.278vw solid white;
    // align-items: center;
    color: whitesmoke;

    .Single {
      flex: 1;
      .info {
        margin-top: 2.778vw;
        font-size: 3.889vw;
      }
      .title {
        font-size: 4.444vw;
        font-weight: 600;
        margin-bottom: 2.778vw;
      }
    }
    .images {
      width: 30.556vw;
      height: 20.556vw;
      object-fit: cover;
    }
  }
  .multiplie {
    border-bottom: 0.278vw solid white;
    margin-top: 2.778vw;
    padding: 2.778vw;
    .title {
      font-size: 4.444vw;
      font-weight: 600;
      margin-bottom: 2.778vw;
    }
    .mulimg {
      width: 30.556vw;
      height: 20.556vw;
      margin: 0.556vw 0.278vw;
      object-fit: cover;
    }
    .info {
      margin-top: 2.778vw;
      font-size: 3.889vw;
    }
  }

  .video {
    padding: 4.167vw 2.778vw 2.778vw 2.778vw;
    border-bottom: 1.001px solid white;
    .title {
      font-size: 4.444vw;
      font-weight: 600;
      margin-bottom: 2.778vw;
    }
    .cover {
      text-align: center;
      position: relative;
      img {
        width: 100%;
        height: 55.556vw;
        margin: 0 auto;
      }
      .iconshipin {
        // box-sizing: border-box;
        position: absolute;
        top: 35%;
        left: 40%;
        font-size: 8.333vw;
        padding: 2.778vw;
        background: rgba(170, 0, 200, 0.3);
        color: fuchsia;
        border-radius: 13.889vw;
        // opacity: 0.1;
      }
    }
    .info {
      margin-top: 2.778vw;
      font-size: 3.889vw;
    }
  }
}
</style>